package com.ziqing.apeletnews.adapter;

import android.content.Context;
import android.support.annotation.NonNull;
import android.widget.ImageView;
import android.widget.TextView;

import com.ziqing.apeletnews.R;
import com.ziqing.apeletnews.base.BaseAdapter;
import com.ziqing.apeletnews.base.BaseViewHolder;
import com.ziqing.apeletnews.bean.ListBean;
import com.ziqing.apeletnews.bean.ToolsListBean;

import java.util.List;

/**
 * Created by WT on 2018/4/13.
 */

public class ToolsAdapter extends BaseAdapter<ToolsListBean> {

    private ImageView iv_icon;
    private TextView tv_des;



    public ToolsAdapter(@NonNull Context mContext, @NonNull List<ToolsListBean> listData, int layoutId) {
        super(mContext, listData, layoutId);
    }

    @Override
    public void onBindViewHolder(BaseViewHolder holder, ToolsListBean data, int position) {
        iv_icon = holder.getView(R.id.iv_icon);
        tv_des = holder.getView(R.id.tv_des);

        iv_icon.setImageResource(data.getUrl());
        tv_des.setText(data.getContent());
    }


}
